<?
require("config.php");

$show_backnav = "menu";
$location_status .= "| Delete";


$menutype = 2;

if (NULL!=$action){

   $Query = "delete from $table where id=$id Limit 1";

   myQuery($Query);


   header("location:" . $rela_path . "share/msg.php?v=753&id=$parent_id&label=$Schedule");

   exit();

}


if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");
  
}

$Query = "select 
	code,
	course,
	schedule,
	date,
	firstname,
	famiry_name,
	phone,
	fax,
	address,
	city,
	country,
	email,
	profession,
	education,
	enroller,
	enroller_method,
	amount,
	payment_method,
	cardtype,
	cardname,
	cardno,
	expiration 
from $table where id='$id' Limit 1";
$r = myQuery($Query);



	$Code=$r[0][0];
	$Course=$r[0][1];
	$Schedule=$r[0][2];
	$Date=$r[0][3];
	$Firstname=$r[0][4];
	$Famiry_name=$r[0][5];
	$Phone=$r[0][6];
	$Fax=$r[0][7];
	$Address=$r[0][8];
	$City=$r[0][9];
	$Country=$r[0][10];
	$Email=$r[0][11];
	$Profession=$r[0][12];
	$Education=$r[0][13];
	$Enroller=$r[0][14];
	$Enroller_method=$r[0][15];
	$Amount=$r[0][16];
	$Payment_method=$r[0][17];
	$Cardtype=$r[0][18];
	$Cardname=$r[0][19];
	$Cardno=$r[0][20];
	$Expiration=$r[0][21];

require($rela_path . "inc/header.php");
require($rela_path . "bin/date.php");
?>

<!--Content Start-->
<form action="" method="post" enctype="multipart/form-data" name="form1">  
<!--hidden filed-->
<input name="id" type="hidden" value="<?print($id)?>">
<input name="action" type="hidden" value="delete">

<?

if ($label){

	echo "<input type=\"hidden\" name=\"Schedule\" value=\"$label\">";

}

?>

  <table width="95%" border="0" align="center">
                      <tr> 
                        
      <td>&nbsp; </td>
                      </tr>
                      <tr> 
                        
      <td><strong>Are you sure to delete this enrollment  ?</strong> <input type="Submit" class="button" name="Button" value="   Yes   "> 
        <input type="button" class="button" name="Submit2" value="   No   " onClick="Redirect('menu.php?id=<?=$parent_id?>',1);"> 
        <br>
        <br>


<table border="0">


          <tr> 
            <td class="tdheader">Course :</td>
            <td>

<?=$Course?> 

			  
			  </td>
          </tr>

          <tr> 
            <td class="tdheader">Schedule :</td>
            <td>

<?=$Schedule?>  

<input type="hidden" name="parent_id" value="<?=$parent_id?>">	  
			  
			  </td>
          </tr>


    <tr> 
      <td align="right">&nbsp; </td>
    </tr>









          <tr> 
            <td class="tdheader">Enrol Date :</td>
            <td>
              <?=$Date?>
            </td>
          </tr>
          <tr> 
            <td width="128" class="tdheader">First Name :</td>
            <td width="523"> <?=$Firstname?>
            </td>
          </tr>
          <tr> 
            <td class="tdheader">Family Name : </td>
            <td><?=$Famiry_name?></td>
          </tr>
          <tr> 
            <td class="tdheader">Tel :</td>
            <td><?=$Phone?></td>
          </tr>
          <tr> 
            <td class="tdheader">Fax :</td>
            <td><?=$Fax?></td>
          </tr>
          <tr> 
            <td class="tdheader">Address :</td>
            <td><?=$Address?></td>
          </tr>

          <tr> 
            <td class="tdheader">City :</td>
            <td><?=$City?></td>
          </tr>

          <tr> 
            <td class="tdheader">Country :</td>
            <td><?=$Country?></td>
          </tr>



          <tr> 
            <td class="tdheader">E-mail :</td>
            <td><?=$Email?></td>
          </tr>
          <tr> 
            <td class="tdheader">Profession :</td>
            <td><?=$Profession?></td>
          </tr>
          <tr> 
            <td class="tdheader">Education :</td>
            <td><?=$Education?></td>
          </tr>
          <tr> 
            <td class="tdheader">Enroller :</td>
            <td><?=$Enroller?></td>
          </tr>
          <tr> 
            <td class="tdheader">Enrol Method :</td>
            <td> 
              <?=$Enroller_method?>
            </td>
          </tr>
          <tr> 
            <td class="tdheader">Amount :</td>
            <td><?=$Amount?></td>
          </tr>
          <tr> 
            <td class="tdheader">Payment Method :</td>
            <td><?=$Payment_method?></td>
          </tr>
          <tr> 
            <td class="tdheader">Credit Card Type :</td>
            <td><?=$Cardtype?></td>
          </tr>
          <tr> 
            <td class="tdheader">Credit Card Name :</td>
            <td><?=$Cardname?></td>
          </tr>
          <tr> 
            <td class="tdheader">Credit Card No. :</td>
            <td><?=$Cardno?></td>
          </tr>
          <tr> 
            <td class="tdheader">Expiration Date :</td>
            <td>
              <?=$Expiration?>
            </td>
          </tr>


        </table></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>

</form>
<!--Content End-->
<?require($rela_path . "inc/footer.php");?>
        